<?php


class NDocument extends NObject {


function &getInstance ($config=array())

    // this implements the 'singleton' design pattern.

    {

        static $instance;

        

        if (!isset($instance)) {

            $c = __CLASS__;

            $instance = new $c($config);
	

        } // if

        

        return $instance;

        

    } // getInstance

function NDocument($config){
$this->theme = NFactory::getTheme();
if ($config->theme) $themename=$config->theme;
$this->theme->setTheme($themename);
}
function render($content){
$this->theme->set("content",$content);
return  $this->theme->render();

}
}
?>